package stringTest;

import java.util.Arrays;


public class StringSort {
    public static void main(String[] args){
        String str="1231231241241";
        char[] arr=str.toCharArray();
        Character[] arr1=new Character[str.length()];
        int i=0;
        for(char ch:arr){
            arr1[i]=ch;
            i++;
        }
        Arrays.sort(arr1, (x, y) -> y-x);
        for(Character ch:arr1){
            System.out.println(ch);
        }
    }
}
